Skip to content

Conversation

@rjernst
Copy link
Member

@rjernst rjernst commented Apr 9, 2025

With the change to using the logs dir as the working dir of the Elasticsearch process we need to ensure the logs dir exists within the CLI instead of later during startup.

relates #124966

With the change to using the logs dir as the working dir of the
Elasticsearch process we need to ensure the logs dir exists within the
CLI instead of later during startup.

relates elastic#124966
@rjernst rjernst added >non-issue :Core/Infra/CLI CLI utilities, scripts, and infrastructure auto-backport Automatically create backport pull requests when merged v8.19.0 v9.1.0 labels Apr 9, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Apr 9, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

andsel added a commit to andsel/logstash that referenced this pull request Apr 11, 2025
@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Apr 11, 2025
@rjernst rjernst requested a review from ldematte April 11, 2025 22:11
Copy link
Contributor

@ldematte ldematte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optionally I'd add some tests for various situations (no dir, existing dir, existing dir with wrong access), but LGTM

@rjernst rjernst requested a review from a team as a code owner April 14, 2025 22:25
@rjernst rjernst merged commit 42dc870 into elastic:main Apr 17, 2025
18 checks passed
@rjernst rjernst deleted the env/logs_working_dir2 branch April 17, 2025 19:59
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 126566

rjernst added a commit to rjernst/elasticsearch that referenced this pull request Jul 2, 2025
With the change to using the logs dir as the working dir of the
Elasticsearch process we need to ensure the logs dir exists within the
CLI instead of later during startup.

relates elastic#124966
elasticsearchmachine pushed a commit that referenced this pull request Aug 20, 2025
* Use logs dir as working directory (#124966)

In the unexpected case that Elasticsearch dies due to a segfault or
other similar native issue, a core dump is useful in diagnosing the
problem. Yet core dumps are written to the working directory, which is
read-only for most installations of Elasticsearch. This commit changes
the working directory to the logs dir which should always be writeable.

* Ensure logs dir exists before using as working dir (#126566)

With the change to using the logs dir as the working dir of the
Elasticsearch process we need to ensure the logs dir exists within the
CLI instead of later during startup.

relates #124966

---------

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged backport pending :Core/Infra/CLI CLI utilities, scripts, and infrastructure >non-issue serverless-linked Added by automation, don't add manually Team:Core/Infra Meta label for core/infra team v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants